package com.allenyuan.gcode;

import java.awt.geom.Point2D;
import java.util.ArrayList;
import java.util.List;

public class GCodeGenerator {
	
	public static String G00(Point2D point) {
		return String.format("G00 X%d Y%d", (int)point.getX(), (int)point.getY());
	}
	
	public static List<String> G01(List<Point2D> points) {
		List<String> gcodes = new ArrayList<String>();
		for (Point2D point : points) {
			gcodes.add(G01(point));
		}
		return gcodes;
	}
	
	public static String G01(Point2D point) {
		return String.format("G01 X%d Y%d F100", (int)point.getX(), (int)point.getY());
	}
	
	public static String G02(Point2D points) {
		return null;
	}
	
	public static String M03() {
		return "M03";
	}
	
	public static String M05() {
		return "M05";
	}

}
